import request from '@/utils/request'

// 查询村居列表
export function listVillage(query) {
    return request({
        url: '/wanzhi/village/list',
        method: 'get',
        params: query
    })
}

// 查询村居详细
export function getVillage(id) {
    return request({
        url: '/wanzhi/village/' + id,
        method: 'get'
    })
}

// 新增村居
export function addVillage(data) {
    return request({
        url: '/wanzhi/village',
        method: 'post',
        data: data
    })
}

// 修改村居
export function updateVillage(data) {
    return request({
        url: '/wanzhi/village',
        method: 'put',
        data: data
    })
}

// 删除村居
export function delVillage(id) {
    return request({
        url: '/wanzhi/village/' + id,
        method: 'delete'
    })
}
